<!-- <template>
	<view>
		<view>
		<u-cell-group>
			<u-cell-item title="法人认证状态" :value="isCertification?'已认证':'待认证'" 
			:required="true" :arrow="false" :valueStyle="isCertification?vcolor1:vcolor2"></u-cell-item>
			<u-cell-item title="法人信息" :value="isCertification?'已上传':'待上传'"
			:required="true" :valueStyle="isCertification?vcolor1:vcolor2" 
			@click="isCertificationed()"></u-cell-item>
		</u-cell-group>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userstatus: -1, //用户状态码
				isCertification: false, //认证状态
				vcolor1:{
					'color': 'rgba(255, 87, 51, 1)'
				} ,
				vcolor2:{
					'color': 'rgba(166, 166, 166, 1)'
				}
			}
		},
		methods: {
			isCertificationed(){
				let title1 = '您已完成认证,请勿重复认证';
				let title2 = '请先完成实名认证';
				console.log(this.userstatus)
				if(this.userstatus<0){
					uni.showToast({
						title:title2,
					})
				}else if(this.userstatus>=1){
					uni.showToast({
						title:title1,
					})
				}else{
					this.goto('../legal_person/legal_person')
				}
				
			},
			goto(url) {
				uni.navigateTo({
					url: url,
					animationType: 'slide-in-right',
					animationDuration: 1000
			
				})
			},
			getcertinfo(){
				let a = getApp().globalData.userinfo.userStatus;
				// console.log(a);
				if(a!=null){
					this.userstatus = a;
				}
				// console.log(this.userstatus)
				this.isCertification= this.userstatus>=1?true:false;
			}
		},
		onLoad(){
			this.getcertinfo();
			
		}
	}
</script>

<style>

</style> -->